SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[clusterResult]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[clusterResult](
	[table_name] [varchar](255) NOT NULL,
	[cluster_experiment_name] [varchar](255) NOT NULL,
	[shop_id] [uniqueidentifier] NOT NULL,
	[cluster_class_result] [int] NOT NULL,
 CONSTRAINT [PK_clusterResult] PRIMARY KEY CLUSTERED 
(
	[table_name] ASC,
	[shop_id] ASC,
	[cluster_experiment_name] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[clusterResultAbstract]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[clusterResultAbstract](
	[table_name] [varchar](255) NOT NULL,
	[cluster_experiment_name] [varchar](255) NOT NULL,
	[cluster_id] [int] NOT NULL,
	[abstract] [varchar](max) NULL,
 CONSTRAINT [PK_clusterResultAbstract] PRIMARY KEY CLUSTERED 
(
	[table_name] ASC,
	[cluster_experiment_name] ASC,
	[cluster_id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[clusterResult_batch]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[clusterResult_batch](
	[table_name] [varchar](255) NOT NULL,
	[cluster_experiment_name] [varchar](255) NOT NULL,
	[batch_id] [int] NOT NULL,
	[batch_text_num] [int] NOT NULL,
	[shop_id] [uniqueidentifier] NOT NULL,
	[cluster_class_result] [int] NOT NULL,
 CONSTRAINT [PK_clusterResult_batch_1] PRIMARY KEY CLUSTERED 
(
	[table_name] ASC,
	[cluster_experiment_name] ASC,
	[batch_id] ASC,
	[batch_text_num] ASC,
	[shop_id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[clusterResultAbstract_batch]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[clusterResultAbstract_batch](
	[table_name] [varchar](255) NOT NULL,
	[cluster_experiment_name] [varchar](255) NOT NULL,
	[batch_id] [int] NOT NULL,
	[batch_text_num] [int] NOT NULL,
	[cluster_id] [int] NOT NULL,
	[abstract] [varchar](max) NULL,
 CONSTRAINT [PK_clusterResultAbstract_batch_1] PRIMARY KEY CLUSTERED 
(
	[table_name] ASC,
	[cluster_experiment_name] ASC,
	[batch_id] ASC,
	[batch_text_num] ASC,
	[cluster_id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[idfInfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[idfInfo](
	[table_name] [nvarchar](40) NOT NULL,
	[attribute_name] [nvarchar](40) NOT NULL,
	[string_name] [nvarchar](40) NOT NULL,
	[string_id] [int] NOT NULL,
	[idf_value] [float] NOT NULL,
	[idf_count_text] [int] NOT NULL,
 CONSTRAINT [PK_idfInfo_1] PRIMARY KEY CLUSTERED 
(
	[table_name] ASC,
	[attribute_name] ASC,
	[string_name] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[idfInfo_batch]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[idfInfo_batch](
	[table_name] [nvarchar](40) NOT NULL,
	[batch_id] [int] NOT NULL,
	[batch_text_num] [int] NOT NULL,
	[attribute_name] [nvarchar](40) NOT NULL,
	[string_name] [nvarchar](40) NOT NULL,
	[string_id] [int] NOT NULL,
	[idf_value] [float] NOT NULL,
	[idf_count_text] [int] NOT NULL,
 CONSTRAINT [PK_idfInfo_batch] PRIMARY KEY CLUSTERED 
(
	[table_name] ASC,
	[batch_id] ASC,
	[batch_text_num] ASC,
	[attribute_name] ASC,
	[string_name] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
